﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Test12
{
    class Program
    {
        static void Main(string[] args)
        {

            Stack st = new Stack();
            st.Push("第一个盘子");
            st.Push("第二个盘子");
            st.Push("第三个盘子");
            st.Push("第四个盘子");
            st.Push("第五个盘子");
            object[] obj = st.ToArray();
            foreach (var i in obj )
            {
                Console.WriteLine(i );
            }

            while (st.Count !=0)
            {
                Console.WriteLine(st.Peek  ());
            }

        }
    }
}
